﻿using System;
using System.Collections.Generic;
using System.Text;

namespace zielonka.co.uk.extensions.system.collections.generic.queue
{
    // Description:	Enqueues an aray of items to a Queue rather than having to loop and call Enqueue for each item.
    /*
        queue.EnqueueAll(new string[] 
                {
                    "foo", "bar"
                });
    */

    public static partial class GenericQueueExtensions
    {        
        public static void EnqueueAll<T>(this Queue<T> queue, T[] items)
        {
            foreach (var item in items)
                queue.Enqueue(item);
        }        
    }
}
